function train(query, selected) {
	xmlhttp=new XMLHttpRequest();
	xmlhttp.open("GET","http://localhost:8080/train?query=" + query 
	+ "&selected=" + selected,true);
	xmlhttp.send();
	return true
  };

  function rate(artist, song, score) {
	xmlhttp=new XMLHttpRequest();
	xmlhttp.open("GET","http://localhost:8080/rate?score=" + score + "&song=" +
	song + "&artist=" + artist,false);
	xmlhttp.send();
	xmlDoc=xmlhttp.responseXML;
	return true
  };
 
  function crawl(){
	xmlhttp=new XMLHttpRequest();
	xmlhttp.open("POST","http://localhost:8080/crawl",true);
	xmlhttp.send();
	alert("Crawling...");
	return true
  }
  
    function crawlstop(){
	xmlhttp=new XMLHttpRequest();
	xmlhttp.open("POST","http://localhost:8080/crawlstop",true);
	xmlhttp.send();
	alert("Stopping crawling...");
	return true
  }